*** Politial Schock and International Students: Estiamting the "Trump Effect"

**** Mingsi Song****
*** mingsi@tamu.edu***
*** This file is used to generate Table 1, and Table A1 - Table A4 in appendix. 


capture log close
set more off


** capture cd, set your working directory
** capture use "trumpeffect.dta"
capture use "trumpeffect.dta"
* load in the dataset "trumpeffect.dta"
log using "output.log", replace

*** Table 1 is combined from the coefficients of "ustrump" of Table A1 and Table A2:
*** Table A1:
qui ppmlhdfe number  US trump ustrump if top6 == 1 & year != 2016, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a11
qui ppmlhdfe number  US trump ustrump  gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if top6 == 1& year != 2016, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a12
qui ppmlhdfe number  US trump ustrump if top6 == 1& year != 2016, absorb(id year) cluster(id) nolog
est store a13
qui ppmlhdfe number  US trump ustrump gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if top6 == 1 & year != 2016, absorb(id year) cluster(id) nolog
est store a14
qui ppmlhdfe number  US trump ustrump if top11 == 1 & year != 2016, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a15
qui ppmlhdfe number  US trump ustrump  gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if top11 == 1 &year != 2016, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a16
qui ppmlhdfe number  US trump ustrump if top11 == 1 & year != 2016, absorb(id year) cluster(id) nolog
est store a17
qui ppmlhdfe number  US trump ustrump gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if top11 == 1  &year != 2016, absorb(id year) cluster(id) nolog
est store a18

esttab a11 a12 a13 a14 a15 a16 a17 a18,  b(2) se(2) obslast label title("Trump Effect": US and the Other Top 5 and 10 Destinations (Exclude 2016)) star(* 0.10 ** 0.05 *** 0.01) compress



 
 *** Table A2:
qui ppmlhdfe number  US trump ustrump if top21 == 1 & year != 2016, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a21

qui ppmlhdfe number  US trump ustrump  gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if top21 == 1 &year != 2016, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a22
qui ppmlhdfe number  US trump ustrump if top21 == 1 &year != 2016, absorb(id year) cluster(id) nolog
est store a23

qui ppmlhdfe number  US trump ustrump gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if top21 == 1 &year != 2016, absorb(id year) cluster(id) nolog
est store a24

qui ppmlhdfe number  US trump ustrump if year != 2016 , absorb(ccode_home ccode_host year) cluster(id) nolog
est store a25

qui ppmlhdfe number  US trump ustrump  gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if year != 2016, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a26

qui ppmlhdfe number  US trump ustrump if year != 2016, absorb(id year) cluster(id) nolog
est store a27

qui ppmlhdfe number  US trump ustrump gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if year != 2016, absorb(id year) cluster(id) nolog
est store a28

esttab a21 a22 a23 a24 a25 a26 a27 a28,  b(2) se(2) obslast label title("Trump Effect": US and the Other Top 20 and All Destinations (Exclude 2016)) star(* 0.10 ** 0.05 *** 0.01) compress



 
  
*** Table A3:
qui ppmlhdfe number  US trump ustrump if top6 == 1, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a31

qui ppmlhdfe number  US trump ustrump  gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if top6 == 1, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a32

qui ppmlhdfe number  US trump ustrump if top6 == 1, absorb(id year) cluster(id) nolog
est store a33

qui ppmlhdfe number  US trump ustrump gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if top6 == 1 , absorb(id year) cluster(id) nolog
est store a34

qui ppmlhdfe number  US trump ustrump if top11 == 1, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a35

qui ppmlhdfe number  US trump ustrump  gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if top11 == 1, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a36

qui ppmlhdfe number  US trump ustrump if top11 == 1, absorb(id year) cluster(id) nolog
est store a37

qui ppmlhdfe number  US trump ustrump gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if top11 == 1 , absorb(id year) cluster(id) nolog
est store a38

esttab a31 a32 a33 a34 a35 a36 a37 a38,  b(2) se(2) obslast label title("Trump Effect": US and the Other Top 5 and 10 Destinations (Include 2016)) star(* 0.10 ** 0.05 *** 0.01) compress




*** Table A4
qui ppmlhdfe number  US trump ustrump if top21 == 1, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a41

qui ppmlhdfe number  US trump ustrump  gdp_pc_ratio lnpop_home lnpop_host  contiguity comlanguage colony lndistance if top21 == 1, absorb(ccode_home ccode_host year) cluster(id) nolog
est store a42

qui ppmlhdfe number  US trump ustrump if top21 == 1, absorb(id year) cluster(id) nolog
est store a43

qui ppmlhdfe number  US trump ustrump gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance if top21 == 1 , absorb(id year) cluster(id) nolog
est store a44

qui ppmlhdfe number  US trump ustrump , absorb(ccode_home ccode_host year) cluster(id) nolog
est store a45

qui ppmlhdfe number  US trump ustrump , absorb(id year) cluster(id) nolog
est store a46

qui ppmlhdfe number  US trump ustrump gdp_pc_ratio lnpop_home lnpop_host contiguity comlanguage colony lndistance , absorb(id year) cluster(id) nolog
est store a47

esttab a41 a42 a43 a44 a45 a46 a47,  b(2) se(2) obslast label title("Trump Effect": US and the Other Top 20 and All Destinations (Include 2016)) star(* 0.10 ** 0.05 *** 0.01) compress






















